<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../../../lib/html5shiv.js?rev=@@hash"></script>
    <script type="text/javascript" src="../../../lib/respond.min.js?rev=@@hash"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="../../../lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="../../../ht-css/Project.css" />
    <link rel="stylesheet" type="text/css" href="../../../lib/Validform/5.3.2/style.css" />
    <!--[if IE 6]>

    <script type="text/javascript" src="../../../lib/DD_belatedPNG_0.0.8a-min.js?rev=@@hash"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../../ht-css/style-q.css" />
    <title>客户退货</title>
</head>
<style>
    .selects{
        float: left;
        width: 100px;
        height: 30px;
        margin-right: 10px;
    }
</style>
<body>
<nav class="breadcrumb">订单管理 <span class="c-gray en">&gt;</span> 订单查询 <span class="c-gray en">&gt;</span> 客户退货<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<article class="page-container">
  <form class="ml-20 mr-20" id="form-member-add">
    <div class="bg-1 bk-gray pd-20 mb-20">
      <div class="va-m lh-20 f-14 pb-15"><strong>选择退货商品</strong><a onclick="returnAll()" class="btn btn-secondary radius size-S ml-20">全部退货</a>
          <span style="float: right;">从当前数据中检索：<input type="text" oninput="retrievaldatas(this)" class="input-text radius" style="width: 110px;"></span>
      </div>
      <div class="mb-50">
        <table class="table table-border table-bordered" id="datatable">
            <thead>
                <tr class="text-c">
                    <th style="width: 300px;">商品</th>
                    <th>发货仓</th>
                    <th>购买数量</th>
                    <th>出库数量</th>
                    <th>可退数量</th>
                    <th>退货数量</th>
                </tr>
            </thead>
            <tbody class="shun"></tbody>
        </table>
          <table class="table table-border table-bordered"  id="datatablerel">
              <thead>
              <tr class="text-c">
                  <th style="width: 300px;">商品</th>
                  <th>发货仓</th>
                  <th>购买数量</th>
                  <th>出库数量</th>
                  <th>可退数量</th>
                  <th>退货数量</th>
              </tr>
              </thead>
              <tbody class="shun"></tbody>
          </table>
      </div>
      <div class="clearfix">
        <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>退货原因：</label>
        <span class="select-box size-M radius col-xs-8" style="width:339px">
          <select class="select" name="returnReason" id="returnReason" size="1">
	              <option value="10" selected>商品质量问题</option>
              <option value="12">收到商品与网站展示不符(颜色、图片、规格、产地及详情描述)</option>
              <option value="50">商品发错/少发/漏发</option>
              <option value="13">客户原因无理由退货</option>
              <option value="100">未按约定时间发货</option>
              <option value="80">到货物流破损</option>
              <option value="70">多买/买错不想要了</option>
              <option value="14">资质问题</option>
              <option value="90">发票问题</option>
              <option value="11">其他原因</option>
          </select>
        </span>
      </div>
      <div class="clearfix mt-20">
          <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>退货说明：</label>
        <div class="formControls col-sm-5 pl-10 f-l">
          <textarea name="returnRemark" class="textarea radius" id="returnRemark" datatype="*1-500" onKeyUp="value=value.replace(/\s+/g,'')"></textarea>
        </div>
          <span class="Validform_checktip"></span>
      </div>
      <div class="clearfix mt-20" >
         <label class="form-label f-l pt-5">退货凭证：</label><br>
          <div class="ceshi">

          </div>
          <div class="pic_up_btn">
              <div class="pic_up" id="addPicBtn"><img title="" width="50" height="50" class="myImg" class="mr-10" onclick="addBtn(this)"></div>
              <!--<input id="fileUp4" style="display: none">-->
              <input type="file" class="fileUp" id="filesUp" onchange="putDataToPage(event,this)" multiple style="display: none;">
              <!--<a id="addImgs" class="hide" onclick="getupfilerul()"><span>上传</span></a>-->
              &nbsp;&nbsp;&nbsp;&nbsp;<a id="deletBtn" onclick="deleteFiles()" class=""><span>删除</span></a>
          </div>
        <!--<div class="formControls f-l">-->
            <!--<img title="" width="50" height="50" src="" id="myImg" class="mr-10">-->
            <!--<a onclick="addBtn()"><i class="Hui-iconfont f-22 mt-10"></i></a>&nbsp;-->
            <!--<a onclick="deleteSelect()">删除</a>-->
            <!--<input id="fileUp" multiple="multiple" type="file" onchange="putDataToPage(event)" style="display: none;" datatype="*" errormsg="格式错误，请重新输入" nullmsg="请填写信息">-->
        <!--</div>-->
        <!--<span class="Validform_checktip"></span>-->
      </div>
      <div class="clearfix mt-20">
          <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>取货方式：</label>
          <span class="select-box size-M radius col-xs-8" style="width:200px" >
              <select class="select" name="getGoodsType" id="getGoodsType" onclick="discount()" onchange="exhibition()" size="1">
                  <option value="10" selected >商家上门</option>
                  <option value="20" >客户邮寄</option>

              </select>
              <select class="select" name="getGoType" id="getGoType" style="display: none" size="1" disabled>
                  <option value="30"  selected>门店退货</option>

              </select>
             <!-- <span style="border: none" type="text" class="input-text radius" name="received_name"  id= "receivedame" disabled="disabled">客户邮寄</span>-->
              <select class="select" name="received_name" id="receivedame" style="border: none" size="1" disabled>
                  <option value="20" selected>客户邮寄</option>

              </select>
          </span>
      </div>
      <div class="clearfix mt-20" id="goods_place_box" >
      	<label class="form-label f-l pt-5" id="huohuo"><span class="c-red pr-5" >*</span>货到达情况：</label>
          <span class="select-box size-M radius col-xs-8" style="width:200px" id="huodao">
              <select class="select" name="goods_place" id="goods_place" onchange="exhibition()" size="1">
		            <option value="10" selected>货已到达</option>
		            <option value="20">货未到达</option>                  
		        </select>
          </span>
      </div>
      <div class="clearfix mt-20">
          <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span><span id="getgoosType">取货地址：</span></label>
          <div class="formControls ">
              <div id="default_address" style="line-height: 2.3">
                  <span id="getGoodsAddress"></span>
                  <a onclick="modifyAddress(1)" id="modify">修改</a> &nbsp;&nbsp;&nbsp; <span id="alerror" style="display: none;color: #cc0000 ">请填写详细信息</span>
              </div>
              <div id="Choice_address" class="" style="display: none">
                  <select id="pin_list1" class="selects radius" size="1" onchange="queryAddress('pin_list1')">

                  </select>
                  <select id="pin_list2" class="selects radius" size="1"  onchange="queryAddress('pin_list2')">

                  </select>
                  <select id="pin_list3" class="selects radius" size="1" onchange="queryAddress('pin_list3')">

                  </select>
                  <select id="pin_list4" class="selects radius" size="1">

                  </select>
                  <label style="float: left; line-height: 2.5"><span class="c-red pr-5">*</span>详细地址：</label>
                  <input id="detailAddress" style="width: 200px;" class="selects input-text radius">
                  <a style="line-height: 2.5" onclick="modifyAddress(2)" >取消</a>
                  <a style="line-height: 2.5; margin-left: 10px" onclick="modifyAddress(3)" >保存</a>
                  <!--&nbsp;&nbsp;&nbsp; <span id="arrtfh" style="display: none;color: #cc0000 ">详细地址不能为空!</span>-->
              </div>
              <span class="Validform_checktip"></span>
          </div>
      </div>

        <div class="clearfix mt-20" id="relationOrders" style="display: none">
            <label class="form-label f-l pt-5"><span class="c-red pr-5" >*</span>下次送货订单号：</label>
            <div class="formControls col-xs-2" style="width: 341px;">
                <span id="orderidall"></span> <input type="button" class="btn radius size-S" onclick="relationOrder()" value="关联">
            </div>
        </div>

      <div class="clearfix mt-20">
          <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>联系人：</label>
          <div class="formControls col-xs-2">
            	<input type="text" class="input-text radius" name="received_name"  id= "received_name" placeholder="输入联系人"datatype="s" errormsg="输入格式不正确" onKeyUp="value=value.replace(/\s+/g,'')">
          </div>
          <span class="Validform_checktip"></span>
      </div>
      <div class="clearfix mt-20">
          <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>联系人手机：</label>
          <div class="formControls col-xs-2">
            	<input type="text" class="input-text radius" name="received_telephone" id= "received_telephone" placeholder="输入手机号"datatype="/^[0-9-]{0,20}$/ | /^[0-9]{0,20}$/" errormsg="输入格式不正确" onKeyUp="value=value.replace(/\s+/g,'')">
          </div>
          <span class="Validform_checktip"></span>
      </div>
        <div class="clearfix mt-20">
            <div>退货商品金额：<span id="Return_goods">0</span> 元</div>
            <div>退货商品分摊运费：<span id="Share_freight">0</span> 元</div>
            <div>优惠券分摊金额：<span id="Share_coupon">0</span> 元</div>
            <div>立减分摊：<span id="recoupon">0</span> 元</div>
            <div>积分分摊金额：<span id="integrals">0</span> 元</div>
        </div>
        <div class="clearfix mt-20">
            <label class="form-label f-l pt-5">
                <span class="c-red pr-5">*</span>退运费金额：<span id="return_freight">0</span> 元
                <a style="margin-left: 10px" class="return_freight" onclick="setReturnFreight(1)">退运费</a>
                <a style="margin-left: 10px" class="return_freight" onclick="setReturnFreight(0)">不退运费</a>
            </label>
        </div>
        <div class="clearfix mt-20">
            <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>服务费：</label>
            <div class="formControls col-xs-2">
                <input type="text" class="input-text radius" oninput="service(1)"  id="service_fee" name="service_fee" placeholder="输入服务费"datatype="/^[0-9][0-9.]{2,20}$/ | /^[0-9]{1,20}$/" errormsg="输入格式不正确" onKeyUp="value=value.replace(/\s+/g,'')">
            </div>
            <span class="Validform_checktip"></span>
        </div>
        <div class="clearfix mt-20">
            <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>取货收取运费：</label>
            <div class="formControls col-xs-2">
                <input type="text" class="input-text radius" oninput="service(2)" id="freight" name="freight" placeholder="输入运费" datatype="/^[0-9][0-9.]{2,20}$/ | /^[0-9]{1,20}$/" errormsg="输入格式不正确" onKeyUp="value=value.replace(/\s+/g,'')">
            </div>
            <span class="Validform_checktip"></span>
        </div>
        <div class="clearfix mt-20">
            <div>应退金额：<span id="refund_amount_final">0</span> 元</div>
        </div>
        <div class="clearfix mt-20">
            <label class="form-label f-l pt-5"><span class="c-red pr-5">*</span>退款备注：</label>
            <div class="formControls col-sm-5 pl-10 f-l">
                <textarea name="rejectRemark" class="textarea radius" id="returnMoneyRemark" placeholder="" datatype="*1-500" onKeyUp="value=value.replace(/\s+/g,'')"></textarea>
            </div>
            <span class="Validform_checktip"></span>
        </div>
      <div class="text-c mb-10 mt-30">
        <input name="" type="button" onclick="cancle()" class="btn radius size-M botter mr-20" value="&nbsp;取&nbsp;&nbsp;消&nbsp;">
        <input id="bottm" type="submit" class="btn btn-secondary radius size-M botter " value="&nbsp;提&nbsp;&nbsp;交&nbsp;">
      </div>

    </div>
  </form>
    <!--关联订单号-->
    <div id="relationOrder" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;margin-left: -260px;">
        <div class="modal-dialog" style="top:50%;margin-top:-247px">
            <div class="modal-content radius" style="height:357px;width:666px;">
                <div class="" style="overflow-y: auto;max-height: 245px;height: 245px">
                    <table class="table table-border  table-hover table-bg table-sort mt-10" id="relationOrdertable">
                        <thead>
                        <tr >
                            <th style="width: 12%;">编号</th>
                            <th style="width: 17%;">订单号</th>
                            <th style="width: 12%;">订单状态</th>
                            <th style="width: 15%;">是否有退单</th>
                            <th>收货地址</th>
                        </tr>
                        </thead>
                        <tbody class="freight_by_ladders">
                        </tbody>
                    </table>
                </div>
                <div class="text-c" style="padding-top: 2%;position: inherit;">
                    <a onclick="relationOrderdetermine()" class="btn btn-secondary radius size-S mr-10">确定</a>
                    <a onclick="relationOrdercancel()" class="btn  radius size-S ">取消</a>
                </div>
            </div>
        </div>
    </div>
</article>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../../../lib/jquery/1.9.1/jquery.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/layer/2.4/layer.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../static/h-ui/js/H-ui.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../static/h-ui.admin/js/H-ui.admin.js?rev=@@hash"></script> <!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../../../lib/My97DatePicker/4.8/WdatePicker.js?rev=@@hash"></script>
<!--表单验证-->
<script type="text/javascript" src="../../../lib/jquery.validation/1.14.0/jquery.validate.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/jquery.validation/1.14.0/validate-methods.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/jquery.validation/1.14.0/messages_zh.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/datatables/1.10.0/jquery.dataTables.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/laypage/1.2/laypage.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/Validform/5.3.2/Validform_v5.3.2_min.js?rev=@@hash"></script>
<script src="../../../ht-js/frame/doT.min.js?rev=@@hash"></script>
<script src="../../../ht-js/public.js?rev=@@hash"></script>
<!--验证token-->
<script src="../../../ht-js/verifyToken.js?rev=@@hash"></script>
<script src="../../../ht-js/dockingplatform/channelorder/returnGoods.js?rev=@@hash"></script>
</body>
<script type="text/javascript">
    $(function(){
        $("#form-member-add").Validform({
            tiptype:2,
            callback:function(form){
                returnSome();
                return false;
            }
        });
    })
	// function addBtn() {
	// 	$("#fileUp").trigger('click');
	// }
	// var formData = new FormData();
    //
	// function putDataToPage(e) {
	// 	console.log($("#intro").val())
	// 	for(var i = 0; i < e.target.files.length; i++) {
	// 	    console.log(e.target.files)
	// 		var file = e.target.files.item(i);
	// 		if(!(/^image\/.*$/i.test(file.type))) {
	// 			continue; //不是图片 就跳出这一次循环
	// 		}
	// 		//实例化FileReader API
	// 		var freader = new FileReader();
	// 		freader.readAsDataURL(file);
	// 		freader.onload = function(e) {
	// 			$("#myImg").attr("src", e.target.result);
	// 		}
	// 	}
	// 	formData.append('file', $("#fileUp")[0].files[0]);
	// }
    //
	// function deleteSelect() {
	// 	$("#myImg").attr("src", "");
	// 	document.getElementById("fileUp").value = "";
	// }
	function cancle () {
		var index = parent.layer.getFrameIndex(window.name);
		parent.layer.close(index);
	}
</script>
</html>